package com.jf.student.controller;

import com.jf.common.core.controller.BaseController;
import com.jf.common.core.page.TableDataInfo;
import com.jf.student.domain.Student;
import com.jf.student.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@RestController
@RequestMapping("/student/student")
public class StudentController extends BaseController {
	@Autowired
	private IStudentService studentService;

	/**
	 * 1. 查询所有学生列表（分页）
	 * @return
	 */
	@PreAuthorize("@ss.hasPermi('student:student:list')")
	@GetMapping("/list")
	public TableDataInfo list()
	{
		startPage();
		List<Student> list = studentService.findAll();
		return getDataTable(list);
	}
}
